Jumps the music currently playing to sequence position `position` - which entry of the tracker’s own pattern order list plays next.
Works differently on Sega Genesis - The Sega Genesis does this for a song made in the Music tab. A VGM song has no list of orders, so the call does nothing while one plays.
On other consoles this differs: see Side by side and How the consoles differ.
music_position(position)| Name | Type |
|---|---|
position | int |
Nothing.
Jumps the music currently playing to sequence position position - which entry of the tracker's own pattern order list plays next. A no-op while nothing is playing, and resets to 0 the instant music_play/music_fade_to next starts a different song.
This is not a time-based seek. There is no "seconds into the song" on this hardware - only "which entry of the module's own authored order list is playing," the same unit a real tracker/MOD editor already shows as the song's order/pattern list. It is useful for jumping to a section a project itself authored and knows the position of (skip a once-only intro, jump back to a loop point); there is no way to ask a loaded song how many positions it actually has, so a position past that song's own real length is passed straight through, untested.
music_play(song_doc_theme, true, 1);
music_position(4);Starts the theme and immediately skips to its own order-list entry 4 - the right call for a song authored with a short intro (entries 0-3) followed by the part that should repeat (from entry 4 on), so a later music_fade_to back to this same song can resume at the loop instead of replaying the intro.
NOT a time-based seek - there is no "seconds into the song" on this hardware, only "which entry of the module’s own authored order list." Useful for jumping to a known section (a loop point, skipping a once-only intro) in a song a project authored itself; there is no way to ask a loaded song how many positions it has, so a position past the song’s own real length is passed through untested. A no-op while nothing is playing, and resets to 0 on the next DIFFERENT song, same as music_pitch/music_tempo.